package classify

import (
	"news_for_deepseek_interface/controller"
	classifyService "news_for_deepseek_interface/service/admin/classify"

	"github.com/gin-gonic/gin"
)

func All(c *gin.Context) {
	typeQuery := c.Query("type")

	//4. 调用服务层处理登录逻辑
	response, err := classifyService.All(typeQuery)
	if err != nil {
		controller.Fail(c, controller.BusinessError, err.Error())
		return
	}

	controller.Success(c, response)
}
